package lianshoo;

import java.util.Scanner;

public class TestDl {
    public static void main(String[] args) {


    String username = "admin";
    String password = "123456";

    Scanner sc =new Scanner(System.in);
    for(int i = 2; i >= 0 ; i--){
        System.out.println("请输入用户名:");
        String scUsername = sc.nextLine();
        System.out.println("请输入密码:");
        String scPassword = sc.nextLine();
        if (username.equals(scUsername)&&password.equals(scPassword)) {
            System.out.println("登陆成功");
            break;
        }else{

        }
    }
   }

}
